{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T02:50:51.418245Z",
     "start_time": "2020-10-23T02:50:51.384687Z"
    }
   },
   "outputs": [],
   "source": [
    "from sklearn import datasets\n",
    "from sklearn.linear_model import LinearRegression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T02:51:35.209687Z",
     "start_time": "2020-10-23T02:51:35.201004Z"
    }
   },
   "outputs": [],
   "source": [
    "loaded_data=datasets.load_boston()\n",
    "data_X=loaded_data.data\n",
    "data_Y=loaded_data.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T02:52:17.964541Z",
     "start_time": "2020-10-23T02:52:17.951527Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[30.00384338 25.02556238 30.56759672 28.60703649]\n"
     ]
    }
   ],
   "source": [
    "model=LinearRegression()\n",
    "model.fit(data_X,data_Y)\n",
    "# print(model.predict(data_X[:4,:]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T02:55:58.717465Z",
     "start_time": "2020-10-23T02:55:58.709756Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7406426641094095"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# model.coef_\n",
    "# data_X\n",
    "# model.n_jobs\n",
    "model.score(data_X,data_Y)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
